<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>资金转入期指投资</title>
    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/all.css" />
    <script src="js/jquery-1.7.1.min.js"></script>
    <script src="js/PIE.js"></script>
    <script src="js/self.js"></script>
    <style>
        body{
            width: 736px;
            height: 100%;
            background: #fff;
        }
    </style>
</head>
</body ontouchstart="">
<div class="c3 f25 tc jz pr zijinTop">
    资金转入期指投资 <span class="db pa c3 cursor fw700 closeBtn" id="close-x">&times;</span>
</div>
<div class="zijinBlock jz">
    <div class="clearfix of" style="line-height: 34px;margin-top: 38px;">
        <p class="fl f19 c9" style="width: 233px;">您的可用金额</p>  <p class="fl corange f28"><span style="font-size: 34px;">20,000.</span>00</p>
    </div>
    <div class="clearfix of" style="line-height: 34px;margin-top: 20px;margin-bottom: 15px;">
        <p class="fl f19 c9" style="width: 233px;">期指投资可用金额</p>  <p class="fl corange f28"><span style="font-size: 34px;">20,000.</span>00</p>
    </div>
    <input type="number" name="" id="money" min="0" placeholder="转入金额" class="zijinInput db f20 br6"/>
    <p class="cred f14 t2 lh15"></p>
    <input type="text" name="" id="loginPwd" placeholder="您的登陆密码" class="zijinInput db f20 br6"/>
    <p class="cred f14 t2 lh15"></p>
    <div class="clearfix of" style="line-height: 34px;margin-top: 38px;">
        <p class="fl f19 c9" style="width: 233px;">同时可获赠券额</p>
        <p class="fl corange f28"><span style="font-size: 34px;">500,000.</span>00</p>
        <a href="commonProblems.html" class="fl db aht cgreen f15 mgl16">赠券适用说明</a>
    </div>
    <div class="clearfix of" style="line-height: 34px;margin-top: 20px;margin-bottom: 15px;">
        <p class="fl f19 c9" style="width: 233px;">期指投资可用金额将为</p>
        <p class="fl corange f28"><span style="font-size: 34px;">800,000.</span>00</p>
    </div>
    <input type="button" name="" value="确认转入" id="" onclick="Sub();" class="db jz bcblue cf f27 tc cursor" style="width: 403px;height: 63px;line-height: 63px;margin-top: 68px;"/>
</div>


<div id="loadingfDiv" class="loadingfDiv pf w100 h100 db">
    <div class="w100 h100">
        <img src="images/loading.gif" class="db jz" style="margin-top: 40%;">
    </div>
</div><!--loadinfDiv-->


<script>

    $(window).on("load", function() {
        $("#zijinZhuanru", parent.document).click(function () {
            $("#zijinIframeDiv", parent.document).slideDown();
            $(".theme-popover-mask", parent.document).fadeIn();

        })
        $("#close-x").click(function () {
            $("#zijinIframeDiv", parent.document).slideUp();
            $(".theme-popover-mask", parent.document).fadeOut();

        })
    })

    function Sub() {
        var money =$.trim($('#money').val());
        var loginPwd = $.trim($('#loginPwd').val());
        if(money== ""){
            $('#money').next('p').text('你还未填写金额');
            return false;
        }else {
            $('#money').next('p').text(' ');
        }
        if(loginPwd== ""){
            $('#loginPwd').next('p').text('你还未填写密码');
            return false;
        }else {
            $('#loginPwd').next('p').text(' ');
        }
        $.ajax({
            url: "",
            data: {money: money, loginPwd: loginPwd},
            type: 'post',
            dataType: 'json',
            beforeSend: function () {
                $("#loadingfDiv").fadeIn();
            },
            success: function (data) {
                console.log(data);
                if (data.code == 200) {
//                        alert("您的申请已提交,等待审核");
//                        alert(data.msg);
//                        window.location.reload();
//                        location.href = "withdraw.html";
                }else{
//                        alert(data.msg);
                    //window.history.back(-1);
                }
            },
            error: function (data) {
                alert(data.msg);
                return false;
            },
            complete: function () {
                $("#loadingfDiv").fadeOut();
                $("#close-x").trigger('click');
            }
        });
    }
</script>
</body>
</html>